<template>
  <div>
    <div class="app_news_details">
      <div class="banner">
        <h3 class="title">{{ new_detailsList.title }}</h3>
        <div class="title_bottom">
          <span class="date">发表时间：{{ new_detailsList.add_time | dateFormat }}</span>
          <span class="click_number">点击次数：{{ new_detailsList.click }}</span>
        </div>
        <div class="content" v-html="new_detailsList.content"></div>
        <!-- 发表评论 -->
        <newment></newment>
  </div>
    </div>
  </div>
</template>

<script>
import ment from '../Goods/Goodscomment'
export default {
  data() {
    return {
      new_detailsList: {},
      message: "",
      list: [],
      error: false,
      loading: false,
      age: 1
    };
  },
  components:{
    'newment':ment
  },
  created() {
    this.getnews_details();
  },
  methods: {
    async getnews_details() {
      // const arr = window.location.hash.split("=");
      // const id = arr[1];
      // console.log(id);
      const id=this.$route.query.userid
      const { data: res } = await this.$http.get("/api/getnew/" + id);
      console.log(res.message);
      this.new_detailsList = res.message[0];
    }
  }
};
</script>

<style scoped>
.title {
  font-size: 14px;
  color: #1989fa;
  text-align: center;
  line-height: 30px;
  margin: 0;
  padding: 5px 0;
}
.title_bottom {

  padding: 18px 0;
  line-height: 20px;
  border-bottom: 1px solid #ccc;
  /* margin-bottom: 10px; */
}

.title_bottom .date {
  position: absolute;
  left: 10px;
  color: #1989fa;
  font-size: 13px;
}

.click_number {
  color: #1989fa;
  font-size: 13px;
  position: absolute;
  right: 10px;
}
.content {
  display: block;
  text-align: left;
}


/* 发表评论 */
.pl_box {
  margin: 0 10px;
  border-bottom:1px solid #000;
}
.pinglun {
  font-size:17px;
  font-weight: 700;
  float: left;
}
.pl_content {
  text-align: left;
}
.liuyan_box {
  border: 1px solid #eee;
  margin: 10px 10px;
}
.van-list .listbg {
  margin-top: 5px;
  height: 30px;
  background-color: #ccc;
  font-size: 12px;
  line-height: 30px;
  text-align: left;
}
.main {
  margin-bottom: 50px;
}

</style>
